<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<!--顶部导航栏-->
<nav class="ui inverted attached segment m-padded-tb-mini" th:fragment="headbar(n)">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Blog</h2>
            <a th:href="@{/}" class="m-item item m-mobile-hide" th:classappend="${n==1} ? 'active'"><i class="home icon"></i>首页</a>
            <a th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><i class="idea icon"></i>分类</a>
            <a th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active'"><i class="tags icon"></i>标签</a>
            <a th:href="@{/archives}" class="m-item item m-mobile-hide" th:classappend="${n==4} ? 'active'"><i class="clone icon"></i>归档</a>
            <a th:href="@{/about}" class="m-item item m-mobile-hide" th:classappend="${n==5} ? 'active'"><i class="info icon"></i>关于我</a>
            <div class="right m-item item m-mobile-hide">
                <form name="search" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon inverted transparent input">
                        <input type="text" name="query" placeholder="Search...." th:value="${query}">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
</nav>

<!--底部栏--->
<footer class="ui inverted vertical segment m-padded-tb-massive" th:fragment="footbar">
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="three wide column">
                <div class="ui inverted link list">
                    <div class="item">
                        <img th:src="@{/images/wechat.png}" class="ui rounded image" alt="" style="width: 110px">
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                <div id="newblog-container">
                    <div class="ui inverted link list" th:fragment="newBlogList">
                        <a th:href="@{/blog/{id}(id=${blog.id})}" class="item" th:each="blog : ${newBlogs}" th:text="${blog.title}">用户故事 {User Story}</a>
                    </div>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item" th:text="'Email：' + |#{index.email}|">Email：lkx620523@163.com</a>
                    <a href="#" class="item" th:text="'QQ：' + |#{index.qq}|">QQ：1123990997</a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-text-thin m-text-spaced">概要</h4>
                <p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客、会分享关于编程、写作、思考相关的任何内容，希望可以给来到这儿的人有所帮助....</p>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright @ 2020 - 2021 Kechelle Designed by Kechelle</p>
    </div>

</footer>

<th:block th:fragment="script">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.0/dist/semantic.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
    <script th:src="@{/lib/editormd/editormd.min.js}"></script>
    <script th:src="@{/lib/prism/prism2.js}"></script>
    <script th:src="@{/lib/tocbot/tocbot.js}"></script>
    <script th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
    <script>
        $('#newblog-container').load(/*[[@{/footer/newBlog}]]*/"/footer/newBlog");
    </script>
</th:block>

</html>